import request from '@/utils/request'

const apis = {
    SCHOOL_LIST: '/school/getschoollist',
    SCHOOL_INFO: '/school/getschool',
    JOIN: '/school/joinschool',
    GET_REGIONS: '/remoteapi/getregions',
    SIGN_IN: '/exercise/signin',
    SIGN_INFO: '/exercise/getsignininfo',
    SIGN_HISTORY: '/exercise/getsigninstatus'
}

export default {
    
    // 信息列表
    getSchoolList(data) {
        let dt = data || {};
        return request.post(apis.SCHOOL_LIST, dt.params, {
            headers: dt.headers || {}
        });
    },

    // 信息
    getSchoolInfo(data) {
        let dt = data || {};
        return request.post(apis.SCHOOL_INFO, dt.params, {
            headers: dt.headers || {}
        });
    },

    // 信息
    joinSchool(data) {
        let dt = data || {};
        return request.post(apis.JOIN, dt.params, {
            headers: dt.headers || {}
        });
    },

    getRegions(data) {
        let dt = data || {};
        return request.post(apis.GET_REGIONS, dt.params, {
            headers: dt.headers || {}
        });
    },

    getSignInfo(data) {
        let dt = data || {};
        return request.post(apis.SIGN_INFO, dt.params, {
            headers: dt.headers || {}
        });
    },

    signIn(data) {
        let dt = data || {};
        return request.post(apis.SIGN_IN, dt.params, {
            headers: dt.headers || {}
        });
    },

    getSignHistory(data) {
        let dt = data || {};
        return request.post(apis.SIGN_HISTORY, dt.params, {
            headers: dt.headers || {}
        });
    },
}